<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>分配单</title>

  <!-- Google Font: Source Sans Pro -->
  <link rel="stylesheet"
    href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  <!-- Font Awesome Icons -->
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css">
  <!-- IonIcons -->
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/adminlte.min.css">

  <link rel="stylesheet" href="plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
  <link rel="stylesheet" href="plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
  <link type="text/css" rel="stylesheet" charset="UTF-8"
    href="https://translate.googleapis.com/translate_static/css/translateelement.css">
  <script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
  <script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>
  <script src="plugins/jquery/jquery.js"></script>
  <script type="text/javascript">

  </script>
</head>

<body class="hold-transition sidebar-mini">
  <div id="all_two" class="wrapper">
    <!-- /.content-header -->
    <!-- 分配需求单 -->
    <div id="demand5" class="card-body" style="margin-left: 1%; margin-right: 1%;">
      <nav class=" navbar navbar-expand navbar-white navbar-light">
        <ul class="navbar-nav nav-sidebar col-sm-5">
          <li class="nav-item d-none d-sm-inline-block"><a href="#" class="nav-link"> <i
                class="fas fa-paw nav-icon"></i>
              <p>黄金品类</p>
            </a></li>
          <li class="nav-item d-none d-sm-inline-block"><a href="#" class="nav-link" onclick="adddistribution()"> <i
                class="fas fa-plus nav-icon"></i>
              <p>新增分配单</p>
            </a></li>
          <li id="export1" class="nav-item d-none d-sm-inline-block"><a data-type="xls" href="javascript:;"
              class="nav-link"> <i class="fas  fa-random nav-icon"></i>导出
            </a></li>
        </ul>
      </nav>

      <div class="card">
        <!-- /.card-header -->
        <div class="card-body">
          <div id="example1_wrapper" class="dataTables_wrapper dt-bootstrap4">

          </div>
          <div class="row">
            <div class="col-sm-12">
              <table id="example5" class="table table-bordered table-striped dataTable dtr-inline" role="grid"
                aria-describedby="example1_info">
                <thead class="text-center">
                  <tr role="row">
                    <th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                      aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">序号
                    </th>
                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                      aria-label="Browser: activate to sort column ascending">单号</th>
                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                      aria-label="Platform(s): activate to sort column ascending">供应商</th>
                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                      aria-label="Platform(s): activate to sort column ascending">部门</th>
                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                      aria-label="Platform(s): activate to sort column ascending">数量</th>
                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                      aria-label="Platform(s): activate to sort column ascending">重量</th>
                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                      aria-label="Platform(s): activate to sort column ascending">制单人</th>
                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                      aria-label="Engine version: activate to sort column ascending">制单时间</th>
                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                      aria-label="CSS grade: activate to sort column ascending">状态</th>
                    <th tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                      aria-label="CSS grade: activate to sort column ascending">操作</th>
                  </tr>
                </thead>

                <tbody class="text-center">
                  <tr role="row" class="odd" style="display: none;">
                    <td class="" tabindex="0">Gecko</td>
                    <td style="">Epiphany 2.20</td>
                    <td style="">Gnome</td>
                    <td style="">Epiphany 2.20</td>
                    <td style="">Gnome</td>
                    <td style="">Epiphany 2.20</td>
                    <td style="">Gnome</td>
                    <td style="">Gnome</td>
                    <td  style="">1.8</td>
                    <td  style="">1.8</td>
                  </tr>
                  <tr v-for="(disrequirement,index) in disrequirements" role="row" class="odd">
                    <td tabindex="0" class="sorting_1">{{disrequirement.drid}}</td>
                    <td><a href="#" onclick="gotodisDetail1()"
                        @click="dis(disrequirement.orderno,index)">{{disrequirement.orderno}}</a>
                    </td>
                    <td>{{disrequirement.supplier}}</td>
                    <td>{{disrequirement.department}}</td>
                    <td>{{disrequirement.num}}</td>
                    <td>{{disrequirement.weight}}</td>
                    <td>{{disrequirement.wname}}</td>
                    <td>{{disrequirement.time}}</td>
                    <td>{{disrequirement.status}}</td>
                    <td>
                      <div class="dropdown">
                        <button type="button" class="btn dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown">...
                          <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
                          <li role="presentation">
                            <a role="menuitem" tabindex="-1" href="#" @click="dis(disrequirement.orderno,index)"
                              onclick="disdemand()">分配需求</a>
                          </li>
                          <li role="presentation">
                            <a role="menuitem" tabindex="-1" href="#" @click="dis(disrequirement.orderno,index)"
                              onclick="disdetail()">查看详情</a>
                          </li>
                        </ul>
                      </div>
                    </td>
                  </tr>
                </tbody>
              </table>
            </div>
          </div>
        </div>



      </div>
    </div>

    <!-- 新增分配单 -->
    <div id="demand12" class="card-body" style="padding: 0px;margin-left: 1%; margin-right: 1%;display: none;">
      <nav class=" navbar navbar-expand navbar-white navbar-light">
        <ul class="navbar-nav nav-sidebar col-sm-4">
          <li class="nav-item d-none d-sm-inline-block">
            <a class="nav-link">
              <p>新增分配单</p>
            </a>
          </li>

        </ul>
        <ul class="navbar-nav nav-sidebar col-sm-5">

        </ul>
        <ul class="navbar-nav nav-sidebar col-sm-2">
          <button class="btn btn-primary" @click="insertPro()"><i
              class="fas  fa-edit nav-icon"></i>&nbsp;保存</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <button class="btn btn-primary" onclick="gotodemand5()"><i
              class="fas  fa-reply nav-icon"></i>&nbsp;取消</button>
        </ul>

      </nav>
      <nav class=" navbar navbar-expand navbar-white navbar-light" style="height: 1px;">
        <hr style="height: 0.1px; width: 100%;background-color: lightgray;">
      </nav>
      <nav class=" navbar navbar-expand navbar-white navbar-light">
        <ul class="navbar-nav nav-sidebar col-sm-4">
          <li class="nav-item d-none d-sm-inline-block">
            <a class="nav-link">
              <i class="fas fa-signal nav-icon"></i>
              <p>基本信息</p>
            </a>
          </li>
        </ul>
      </nav>
      <nav class=" navbar navbar-expand navbar-white navbar-light">
        <ul class="navbar-nav nav-sidebar  " style="margin-left:1%;position: relative; left: 15px;">
          <li class="nav-item d-none d-sm-inline-block">
            <a>供应商:</a>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar col-sm-3" style="position: relative; left: 15px;">
          <li class="nav-item d-none d-sm-inline-block">
            <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="pro_supplier">
              <option>中国黄金</option>
              <option>老凤祥</option>
              <option>六福珠宝</option>
              <option>盛峰珠宝</option>
              <option>着讯互联</option>
              <option>周大福</option>
            </select>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar" style="position: relative; left: 15px;">
          <li class="nav-item d-none d-sm-inline-block">
            <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;部门:</a>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar col-sm-3" style="position: relative; left: 15px;">
          <li class="nav-item d-none d-sm-inline-block">
            <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="pro_department">
              <option>精品柜A</option>
              <option>精品柜B</option>
              <option>精品柜C</option>
            </select>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar">
          <li class="nav-item d-none d-sm-inline-block">
            <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;状态:</a>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar col-sm-3">
          <li class="nav-item d-none d-sm-inline-block">
            <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="pro_status">
              <option>待采购</option>
            </select>
          </li>
        </ul>
      </nav>
      <nav class=" navbar navbar-expand navbar-white navbar-light">
        <ul class="navbar-nav nav-sidebar  " style="margin-left:1%;">
          <li class="nav-item d-none d-sm-inline-block">
            <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;制单人:</a>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar col-sm-3">
          <li class="nav-item d-none d-sm-inline-block">
            <input type="text" style="height: 40px; width: 200px;" v-model="pro_wname">
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar">
          <li class="nav-item d-none d-sm-inline-block">
            <a>审核人:</a>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar col-sm-3">
          <li class="nav-item d-none d-sm-inline-block">
            <input type="text" style="height: 40px; width: 200px;" v-model="pro_rname">
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar">
          <li class="nav-item d-none d-sm-inline-block">
            <a>制单时间:</a>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar col-sm-3">
          <li class="nav-item d-none d-sm-inline-block">
            <input type="datetime-local" class="measureDate" style="height: 40px; width: 200px;" v-model="pro_time">
          </li>
        </ul>
      </nav>
      <nav class=" navbar navbar-expand navbar-white navbar-light">

        <ul class="navbar-nav nav-sidebar" style="margin-left:2%;">
          <li class="nav-item d-none d-sm-inline-block">
            <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;重量:</a>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar col-sm-3">
          <li class="nav-item d-none d-sm-inline-block">
            <input type="text" style="height: 40px; width: 200px;" v-model="pro_weight">
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar" style="position: relative;left: 20px;">
          <li class="nav-item d-none d-sm-inline-block">
            <a>数量:</a>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar col-sm-3" style="position: relative;left: 20px;">
          <li class="nav-item d-none d-sm-inline-block">
            <input type="text" style="height: 40px; width: 200px;" v-model="pro_num">
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar" style="position: relative;left: 50px;">
          <li class="nav-item d-none d-sm-inline-block">
            <a>单号:</a>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar col-sm-3" style="position: relative;left: 50px;">
          <li class="nav-item d-none d-sm-inline-block">
            <input type="text" style="height: 40px; width: 200px;" v-model="pro_orderno">
          </li>
        </ul>
      </nav>
      <nav class=" navbar navbar-expand navbar-white navbar-light">
        <ul class="navbar-nav nav-sidebar  " style="margin-left:1%;position: relative; left: 15px;">
          <li class="nav-item d-none d-sm-inline-block">
            <a>产品线:</a>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar col-sm-3" style="position: relative; left: 15px;">
          <li class="nav-item d-none d-sm-inline-block">
            <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="pro_line">
              <option>A产品线</option>
              <option>B产品线</option>
              <option>C产品线</option>
            </select>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar" style="position: relative; left: 15px;">
          <li class="nav-item d-none d-sm-inline-block">
            <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;品类:</a>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar col-sm-3" style="position: relative; left: 15px;">
          <li class="nav-item d-none d-sm-inline-block">
            <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="pro_category">
              <option>玉石</option>
              <option>黄金</option>
              <option>玛瑙</option>
            </select>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar" style="position: relative; left: 50px;">
          <li class="nav-item d-none d-sm-inline-block">
            <a>仓库:</a>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar col-sm-3" style="position: relative; left: 50px;">
          <li class="nav-item d-none d-sm-inline-block">
            <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="pro_storehome">
              <option>A仓库</option>
              <option>B仓库</option>
              <option>C仓库</option>
              <option>D仓库</option>
            </select>
          </li>
        </ul>
      </nav>
      <nav class=" navbar navbar-expand navbar-white navbar-light">
        <ul class="navbar-nav nav-sidebar" style="margin-left:1%;position: relative; left: 30px;">
          <li class="nav-item d-none d-sm-inline-block">
            <a>成色:</a>
          </li>
        </ul>
        <ul class="navbar-nav nav-sidebar col-sm-3" style="position: relative; left: 30px;">
          <li class="nav-item d-none d-sm-inline-block">
            <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="pro_quality">
              <option>千足金9999</option>
              <option>万足金10000</option>
            </select>
          </li>
        </ul>
      </nav>
      <nav class=" navbar navbar-expand navbar-white navbar-light">
        <ul class="navbar-nav nav-sidebar col-sm-4">
          <li class="nav-item d-none d-sm-inline-block">
            <a class="nav-link">
              <i class="fas fa-signal nav-icon"></i>
              <p>产品信息</p>
            </a>
          </li>
        </ul>
      </nav>
      <nav class=" navbar navbar-expand navbar-white navbar-light">
        <div class="col-sm-12">
          <table id="example5" class="table table-bordered table-striped dataTable dtr-inline" role="grid"
            aria-describedby="example1_info">
            <thead class="text-center">
              <tr role="row">
                <th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">序号
                </th>
                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="Browser: activate to sort column ascending">单号</th>
                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="Platform(s): activate to sort column ascending">供应商</th>
                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="Platform(s): activate to sort column ascending">部门</th>
                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="Platform(s): activate to sort column ascending">数量</th>
                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="Platform(s): activate to sort column ascending">重量</th>
                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="Platform(s): activate to sort column ascending">制单人</th>
                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="Engine version: activate to sort column ascending">制单时间</th>
                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="CSS grade: activate to sort column ascending">状态</th>
                <th tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="CSS grade: activate to sort column ascending">操作</th>
              </tr>
            </thead>

            <tbody class="text-center">
              <tr role="row" class="odd" style="display: none;">
                <td class="" tabindex="0">Gecko</td>
                <td style="">Epiphany 2.20</td>
                <td style="">Gnome</td>
                <td style="">Epiphany 2.20</td>
                <td style="">Gnome</td>
                <td style="">Epiphany 2.20</td>
                <td style="">Gnome</td>
                <td style="">Gnome</td>
                <td  style="">1.8</td>
                <td  style="">1.8</td>
              </tr>
              <tr v-for="(disrequirement,index) in disrequirements" role="row" class="odd">
                <td tabindex="0" class="sorting_1">{{disrequirement.drid}}</td>
                <td><a href="#" onclick="gotodisDetail2()"
                    @click="dis(disrequirement.orderno,index)">{{disrequirement.orderno}}</a>
                </td>
                <td>{{disrequirement.supplier}}</td>
                <td>{{disrequirement.department}}</td>
                <td>{{disrequirement.num}}</td>
                <td>{{disrequirement.weight}}</td>
                <td>{{disrequirement.wname}}</td>
                <td>{{disrequirement.time}}</td>
                <td>{{disrequirement.status}}</td>
                <td>
                  <div class="dropdown">
                    <button type="button" class="btn dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown">...
                      <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
                      <li role="presentation">
                        <a role="menuitem" tabindex="-1" href="#" @click="dis(disrequirement.orderno,index)"
                          onclick="disdemand()">分配需求</a>
                      </li>
                      <li role="presentation">
                        <a role="menuitem" tabindex="-1" href="#" @click="dis(disrequirement.orderno,index)"
                          onclick="disdetail()">查看详情</a>
                      </li>
                    </ul>
                  </div>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </nav>
    </div>

    <!-- 需求单分配 -->
    <div id="demand6" class="card-body" style="margin-left: 1%; margin-right: 1%;padding: 0px;display: none;">
      <div id="example1_wrapper" class="dataTables_wrapper dt-bootstrap4">
        <nav class=" navbar navbar-expand navbar-white navbar-light">
          <ul class="navbar-nav nav-sidebar col-sm-4">
            <li class="nav-item d-none d-sm-inline-block">
              <a class="nav-link">
                <p>需求单分配</p>
              </a>
            </li>
          </ul>
          <ul class="navbar-nav nav-sidebar col-sm-6">
          </ul>
          <ul class="navbar-nav nav-sidebar col-sm-2">
            <button class="btn btn-primary" @click="updatedis()"><i
                class="fas  fa-edit nav-icon"></i>&nbsp;保存</button>&nbsp;&nbsp;&nbsp;&nbsp;
            <button type="button" class="btn btn-primary" onclick="gotodis()"><i class="fas fa-reply">返回</i></button>
          </ul>
        </nav>
        <nav class=" navbar navbar-expand navbar-white navbar-light" style="height: 1px;">
          <hr style="height: 0.1px; width: 100%;background-color: lightgray;">
        </nav>
        <nav class=" navbar navbar-expand navbar-white navbar-light">
          <ul class="navbar-nav nav-sidebar col-sm-4">
            <li class="nav-item d-none d-sm-inline-block">
              <a class="nav-link">
                <i class="fas fa-signal nav-icon"></i>
                <p>基本信息</p>
              </a>
            </li>
          </ul>
        </nav>
        <nav class="navbar navbar-expand navbar-white navbar-light">
          <ul class="navbar-nav nav-sidebar  " style="margin-left:2%;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>产品线:</a><label>{{diss.line}}</label>
            </li>
          </ul>
          <ul class="navbar-nav nav-sidebar" style="position: relative; left: 200px;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;品类:</a>
            </li>
          </ul>
          <ul class="navbar-nav nav-sidebar col-sm-3" style="position: relative; left: 200px;">
            <li class="nav-item d-none d-sm-inline-block">
              <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="dis_category">
                <option>玉石</option>
                <option>黄金</option>
                <option>玛瑙</option>
              </select>
            </li>
          </ul>
          <ul class="navbar-nav nav-sidebar" style="position: relative; left: 250px;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>仓库:</a>
            </li>
          </ul>
          <ul class="navbar-nav nav-sidebar col-sm-3" style="position: relative; left: 250px;">
            <li class="nav-item d-none d-sm-inline-block">
              <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="dis_storehome">
                <option>A仓库</option>
                <option>B仓库</option>
                <option>C仓库</option>
                <option>D仓库</option>
              </select>
            </li>
          </ul>
        </nav>
        <nav class=" navbar navbar-expand navbar-white navbar-light">
          <ul class="navbar-nav nav-sidebar  " style="margin-left:1%;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;制单人:</a><label>{{diss.wname}}</label>
            </li>
          </ul>

          <ul class="navbar-nav nav-sidebar" style="position: relative; left: 250px;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>审核人:</a><label>{{diss.rname}}</label>
            </li>
          </ul>

          <ul class="navbar-nav nav-sidebar" style="position: relative; left: 600px;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>成色:</a>
            </li>
          </ul>
          <ul class="navbar-nav nav-sidebar" style="position: relative; left: 600px;">
            <li class="nav-item d-none d-sm-inline-block">
              <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="dis_quality">
                <option>千足金9999</option>
                <option>万足金10000</option>
              </select>
            </li>
          </ul>
        </nav>
        <nav class=" navbar navbar-expand navbar-white navbar-light">
          <ul class="navbar-nav nav-sidebar" style="margin-left:1%;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>制单时间:</a>
            </li>
          </ul>
          <ul class="navbar-nav nav-sidebar col-sm-3">
            <li class="nav-item d-none d-sm-inline-block">
              <input type="datetime-local" class="measureDate" style="height: 40px; width: 220px;" v-model="dis_time">
            </li>
          </ul>
          <ul class="navbar-nav nav-sidebar" style="position: relative; left: -35px;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>状态:</a><label>{{diss.status}}</label>
            </li>
          </ul>
          <ul class="navbar-nav nav-sidebar" style="position: relative; left: 280px;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>单号:</a><label>{{diss.orderno}}</label>
            </li>
          </ul>
        </nav>
        <nav class=" navbar navbar-expand navbar-white navbar-light">
          <ul class="navbar-nav nav-sidebar col-sm-4">
            <li class="nav-item d-none d-sm-inline-block">
              <a class="nav-link">
                <i class="fas fa-signal nav-icon"></i>
                <p>产品信息</p>
              </a>
            </li>
          </ul>
        </nav>
        <nav class=" navbar navbar-expand navbar-white navbar-light">
          <div class="col-sm-12">
            <table id="example6" class="table table-bordered table-striped dataTable dtr-inline" role="grid"
              aria-describedby="example1_info">
              <thead class="text-center">
                <tr role="row">
                  <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                    aria-label="Browser: activate to sort column ascending">产品编码</th>
                  <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                    aria-label="Platform(s): activate to sort column ascending">产品名称</th>
                  <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                    aria-label="Platform(s): activate to sort column ascending">供应商</th>
                  <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                    aria-label="Platform(s): activate to sort column ascending">制单时间</th>
                  <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                    aria-label="Platform(s): activate to sort column ascending">重量</th>
                  <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                    aria-label="Platform(s): activate to sort column ascending">数量</th>
                  <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                    aria-label="CSS grade: activate to sort column ascending">状态</th>
                  <th tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                    aria-label="CSS grade: activate to sort column ascending">操作</th>
                </tr>
              </thead>

              <tbody class="text-center">
                <tr v-for="(disrequirement,index) in disrequirements" role="row" class="odd">
                  <td tabindex="0" class="sorting_1"><a href="#" onclick="gotodisDetail3()"
                      @click="dis(disrequirement.orderno,index)">{{disrequirement.orderno}}</a>
                  </td>
                  <td>{{disrequirement.category}}{{disrequirement.quality}}</td>
                  <td>{{disrequirement.supplier}}</td>
                  <td>{{disrequirement.time}}</td>
                  <td>{{disrequirement.weight}}</td>
                  <td>{{disrequirement.num}}</td>
                  <td>{{disrequirement.status}}</td>
                  <td><button type="button" @click="deldis(disrequirement.orderno)" class="btn btn-default btn-sm"><i
                        class="fas fa-trash"></i></button>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
        </nav>
      </div>

    </div>

    <!-- 分配需求单详情 -->
    <div id="demand7" class="card-body" style="margin-left: 1%; margin-right: 1%;padding: 0px;display: none;">
      <div id="example1_wrapper" class="dataTables_wrapper dt-bootstrap4">
        <nav class=" navbar navbar-expand navbar-white navbar-light">
          <ul class="navbar-nav nav-sidebar col-sm-4">
            <li class="nav-item d-none d-sm-inline-block">
              <a class="nav-link">
                <p>需求分配详情</p>
              </a>
            </li>
          </ul>
          <ul class="navbar-nav nav-sidebar col-sm-4">

          </ul>
          <ul class="navbar-nav nav-sidebar col-sm-4">
            <button type="button" class="btn btn-default" @click="lastone()"><i
                class="fas fa-chevron-left">上一条</i></button>&nbsp;&nbsp;
            <button type="button" class="btn btn-default" @click="nextone()"><i
                class="fas fa-chevron-right">下一条</i></button>&nbsp;&nbsp;
            <button type="button" class="btn btn-default" @click="" onclick="gotoddis()"><i
                class="fas fa-pencil">编辑</i></button>&nbsp;&nbsp;
            <button type="button" class="btn btn-primary" onclick="gotodis()"><i class="fas fa-reply">返回</i></button>
          </ul>
        </nav>
        <nav class=" navbar navbar-expand navbar-white navbar-light" style="height: 1px;">
          <hr style="height: 0.1px; width: 100%;background-color: lightgray;">
        </nav>
        <nav class=" navbar navbar-expand navbar-white navbar-light">
          <ul class="navbar-nav nav-sidebar col-sm-4">
            <li class="nav-item d-none d-sm-inline-block">
              <a class="nav-link">
                <i class="fas fa-signal nav-icon"></i>
                <p>基本信息</p>
              </a>
            </li>
          </ul>
          <ul class="navbar-nav nav-sidebar col-sm-4">

          </ul>
          <ul class="navbar-nav nav-sidebar col-sm-4">
            <button type="button" class="btn btn-primary" @click="submitt()"><i class="fas fa-reply">提交</i></button>
          </ul>
        </nav>
        <nav class=" navbar navbar-expand navbar-white navbar-light">
          <ul class="navbar-nav nav-sidebar  " style="margin-left:2%;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>产品线:</a><label>{{disres.line}}</label>
            </li>
          </ul>

          <ul class="navbar-nav nav-sidebar" style="position: relative;left: 240px;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>品类:</a><label>{{disres.category}}</label>
            </li>
          </ul>

          <ul class="navbar-nav nav-sidebar" style="position: relative;left: 520px;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>仓库:</a><label>{{disres.storehome}}</label>
            </li>
          </ul>

        </nav>
        <nav class=" navbar navbar-expand navbar-white navbar-light">
          <ul class="navbar-nav nav-sidebar  " style="margin-left:1%;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;制单人:</a><label>{{disres.wname}}</label>
            </li>
          </ul>

          <ul class="navbar-nav nav-sidebar" style="position: relative;left: 270px;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>审核人:</a><label>{{disres.rname}}</label>
            </li>
          </ul>

          <ul class="navbar-nav nav-sidebar" style="position: relative;left: 580px;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>成色:</a><label>{{disres.quality}}</label>
            </li>
          </ul>
        </nav>
        <nav class=" navbar navbar-expand navbar-white navbar-light">
          <ul class="navbar-nav nav-sidebar  " style="margin-left:1%;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>制单时间:</a><label>{{disres.time}}</label>
            </li>
          </ul>

          <ul class="navbar-nav nav-sidebar" style="position: relative;left: 150px;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;状态:</a><label>{{disres.status}}</label>
            </li>
          </ul>

          <ul class="navbar-nav nav-sidebar" style="position: relative;left: 420px;">
            <li class="nav-item d-none d-sm-inline-block">
              <a>单号:</a><label>{{disres.orderno}}</label>
            </li>
          </ul>
        </nav>
        <nav class=" navbar navbar-expand navbar-white navbar-light">
          <ul class="navbar-nav nav-sidebar col-sm-4">
            <li class="nav-item d-none d-sm-inline-block">
              <a class="nav-link">
                <i class="fas fa-signal nav-icon"></i>
                <p>产品信息</p>
              </a>
            </li>
          </ul>
        </nav>
      </div>
      <nav class=" navbar navbar-expand navbar-white navbar-light">
        <div class="col-sm-12">
          <table id="example7" class="table table-bordered table-striped dataTable dtr-inline" role="grid"
            aria-describedby="example1_info">
            <thead class="text-center">
              <tr role="row">
                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="Browser: activate to sort column ascending">产品编码</th>
                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="Platform(s): activate to sort column ascending">产品名称</th>
                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="Platform(s): activate to sort column ascending">供应商</th>
                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="Platform(s): activate to sort column ascending">制单时间</th>
                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="Platform(s): activate to sort column ascending">重量</th>
                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="Platform(s): activate to sort column ascending">数量</th>

                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                  aria-label="CSS grade: activate to sort column ascending">状态</th>
              </tr>
            </thead>

            <tbody class="text-center">
              <tr v-for="(disrequirement,index) in disrequirements" role="row" class="odd">
                <td tabindex="0" class="sorting_1"><a href="#"
                    @click="dis(disrequirement.orderno,index)">{{disrequirement.orderno}}</a>
                </td>
                <td>{{disrequirement.category}}{{disrequirement.quality}}</td>
                <td>{{disrequirement.supplier}}</td>
                <td>{{disrequirement.time}}</td>
                <td>{{disrequirement.weight}}</td>
                <td>{{disrequirement.num}}</td>
                <td>{{disrequirement.status}}</td>
              </tr>
            </tbody>
          </table>
        </div>
      </nav>
    </div>

    <script type="text/javascript">
      var tindex = 0;
      var tstatus = null;
      var or = null;
      new Vue({
        el: "#all_two",
        data: {
          disrequirements: [],
          diss: [],
          detailss: [],
          disres: [],

          //新增分配单
          pro_orderno: "",
          pro_supplier: "",
          pro_department: "",
          pro_weight: "",
          pro_num: "",
          pro_wname: "",
          pro_rname: "",
          pro_time: "",
          pro_status: "",
          pro_line: "",
          pro_category: "",
          pro_storehome: "",
          pro_quality: "",
          //编辑分配单
          dis_category: "",
          dis_storehome: "",
          dis_quality: "",
          dis_time: "",
          dis_status: ""

        },
        created() {
          axios
            .get("disRequirements/findRequirements")
            .then(res => {
              //console.info(res.data)
              this.disrequirements = res.data;
            })
        },
        methods: {
          dis: function (disorderno, index) {
            tindex = index;
            this.disres = this.disrequirements[index];
            or = disorderno;
            tstatus = this.disrequirements[index].status;
            axios
              .get("disRequirements/finddisRequirementByOrderno", {
                params: {
                  orderno: disorderno
                }
              })
              .then(res => {
                //console.info(res.data)
                this.diss = res.data;
              })
          },
          insertPro: function () {
            if (this.pro_orderno == "" || this.pro_line == "" || this.pro_category == "" || this.pro_storehome == "" || this.pro_weight == "" || this.pro_num == "" || this.pro_quality == "" || this.pro_time == "" || this.pro_status == "" || this.pro_wname == "" || this.pro_rname == "" || this.pro_client == "" || this.pro_department == "") {
              alert("请填写完整，不能为空");
            } else {
              axios
                .get("disRequirements/insert", {
                  params: {
                    orderno: this.pro_orderno,
                    supplier: this.pro_supplier,
                    department: this.pro_department,
                    weight: this.pro_weight,
                    num: this.pro_num,
                    wname: this.pro_wname,
                    rname: this.pro_rname,
                    time: this.pro_time,
                    status: this.pro_status,
                    line: this.pro_line,
                    category: this.pro_category,
                    storehome: this.pro_storehome,
                    quality: this.pro_quality
                  }
                })
                .then(res => {
                  console.info(res.data.message);
                })
            }

          },
          updatedis: function () {
            axios
              .get("disRequirements/update", {
                params: {
                  category: this.dis_category,
                  storehome: this.dis_storehome,
                  quality: this.dis_quality,
                  time: this.dis_time,
                  status: this.dis_status,
                  orderno: or
                }
              })
              .then(res => {
                alert(res.data.message);
              })
          },
          deldis: function (disorderno) {
            axios
              .get("disRequirements/delDisByOrderno", {
                params: {
                  orderno: disorderno
                }
              })
              .then(res => {
                alert(res.data.message);
                var dis = this.disrequirements;
                if (res.data.message == "删除成功") {
                  for (var i = 0; i < dis.length; i++) {
                    var d = dis[i];
                    if (d.orderno == disorderno) {
                      dis.splice(i, 1);
                      //重新赋值
                      this.dis = dis;
                      break;
                    }
                  }
                }
              })
          },
          lastone: function () {
            tindex = tindex - 1;
            if (tindex < 0) {
              tindex = 0;
              alert("已经是第一条了");
            }
            this.disres = this.disrequirements[tindex];
            //console.info(this.detailss);
          },
          nextone: function () {
            tindex = tindex + 1;
            if (tindex > this.disrequirements.length - 1) {
              tindex = this.disrequirements.length - 1;
              alert("已经是最后一条了");
            }
            this.disres = this.disrequirements[tindex];
            //console.info(this.detailss);
          },
          submitt: function () {

            axios
              .get("disRequirements/insertToProcurement", {
                params: {
                  orderno: this.disrequirements[tindex].orderno,
                  supplier: this.disrequirements[tindex].supplier,
                  prodepartment: this.disrequirements[tindex].department,
                  weight: this.disrequirements[tindex].weight,
                  num: this.disrequirements[tindex].num,
                  name: this.disrequirements[tindex].rname,
                  time: this.disrequirements[tindex].time,
                  status: "采购中",
                  line: this.disrequirements[tindex].line,
                  category: this.disrequirements[tindex].category,
                  storehouse: this.disrequirements[tindex].storehome,
                  quality: this.disrequirements[tindex].quality,
                  formtype: "采购入库"
                }
              })
              .then(res => {
                alert(res.data.message);
              }),
              axios
                .get("disRequirements/changeStatus", {
                  params: {
                    orderno: this.disrequirements[tindex].orderno,
                    status: "待采购"
                  }
                })
                .then(res => {
                  alert(res.data.message);
                })
          }
        }
      });
      function disdemand() {
        document.getElementById("demand6").style.display = "";
        document.getElementById("demand5").style.display = "none";
        document.getElementById("demand7").style.display = "none";
        document.getElementById("demand12").style.display = "none";
      }
      function disdetail() {
        document.getElementById("demand7").style.display = "";
        document.getElementById("demand5").style.display = "none";
        document.getElementById("demand6").style.display = "none";
        document.getElementById("demand12").style.display = "none";
      }
      function adddistribution() {
        document.getElementById("demand12").style.display = "";
        document.getElementById("demand5").style.display = "none";
      }
      function gotodemand5() {
        window.location.href = "/disdemand.html";
      }
      function gotodisDetail1() {
        document.getElementById("demand7").style.display = "";
        document.getElementById("demand5").style.display = "none";
      }
      function gotodisDetail2() {
        document.getElementById("demand7").style.display = "";
        document.getElementById("demand12").style.display = "none";
      }
      function gotodisDetail3() {
        document.getElementById("demand7").style.display = "";
        document.getElementById("demand6").style.display = "none";
      }

      function gotodis() {
        window.location.href = "/disdemand.html";
      }
      function gotoddis() {
        if (tstatus == "采购中" || tstatus == "已完成") {
          alert("订单" + tstatus + "，请勿重复提交");
        } else {
          document.getElementById("demand6").style.display = "";
          document.getElementById("demand7").style.display = "none";
        }
      }
      
    </script>
    <!-- /.content-wrapper -->
  </div>
  <!-- ./wrapper -->

  <!-- REQUIRED SCRIPTS -->
  <!-- jQuery -->
  <script src="plugins/jquery/jquery.min.js"></script>

  <!-- Bootstrap -->
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
  <!-- AdminLTE -->
  <script src="dist/js/adminlte.js"></script>

  <!-- OPTIONAL SCRIPTS -->
  <script src="plugins/chart.js/Chart.min.js"></script>
  <!-- AdminLTE for demo purposes -->
  <script src="dist/js/demo.js"></script>
  <!-- AdminLTE dashboard demo (This is only for demo purposes) -->
  <script src="dist/js/pages/dashboard3.js"></script>

  <script src="plugins/datatables/jquery.dataTables.min.js"></script>
  <script src="plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
  <script src="plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
  <script src="plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
  <script src="dist/js/adminlte.min.js"></script>
  <script src="build/js/Blob.js"></script>
  <script src="build/js/FileSaver.js"></script>
  <script src="build/js/tableExport.js"></script>
  <script>
    $(function () {
      //Enable check and uncheck all functionality
      $('.checkbox-toggle').click(function () {
        var clicks = $(this).data('clicks')
        if (clicks) {
          //Uncheck all checkboxes
          $(' input[type=\'checkbox\']').prop('checked', false)
          $('.checkbox-toggle .far.fa-check-square').removeClass('fa-check-square').addClass(
            'fa-square')
        } else {
          //Check all checkboxes
          $(' input[type=\'checkbox\']').prop('checked', true)
          $('.checkbox-toggle .far.fa-square').removeClass('fa-square').addClass(
            'fa-check-square')
        }
        $(this).data('clicks', !clicks)
      })

      //Handle starring for glyphicon and font awesome
      $('.mailbox-star').click(function (e) {
        e.preventDefault()
        //detect type
        var $this = $(this).find('a > i')
        var glyph = $this.hasClass('glyphicon')
        var fa = $this.hasClass('fa')

        //Switch states
        if (glyph) {
          $this.toggleClass('glyphicon-star')
          $this.toggleClass('glyphicon-star-empty')
        }

        if (fa) {
          $this.toggleClass('fa-star')
          $this.toggleClass('fa-star-o')
        }
      })
    });
  </script>
  <script>
    var $exportLink = document.getElementById('export1');
    $exportLink.addEventListener('click', function (e) {
      e.preventDefault();
      if (e.target.nodeName === "A") {
        tableExport('example5', 'Erp分配需求单', e.target.getAttribute('data-type'));
      }
    }, false);
  </script>
  <script>
    $(function () {

      $("#example5").DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $("#example6").DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $("#example7").DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $("#example12").DataTable({
        "responsive": true,
        "autoWidth": false,
      });

    });
  </script>
</body>

</html>